<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input type="text" name="" id="inputId" value="Hello jQuery">

    <script src="../js/jquery-2.1.4.js" type="text/javascript" charset=""></script>
    <script>
        //获取id为。。。的
        var jQueryObj = $('#inputId');
        console.log(jQueryObj.val());
        jQueryObj.attr('value', 'Hello');
        console.log(jQueryObj.val());
        //修改相应的值 value 
        jQueryObj.val('Hello MySQL');
        var test = jQueryObj.val();
        console.log(test.value);
    </script>



</body>

</html>